package mybatis.mappers;

import models.entities.OrderEntity;
import models.entities.OrderItem;
import models.entities.UserEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {
    void placeOrder(OrderEntity order);
    void addOrderItems(OrderEntity order);
    List<OrderItem> getOrderItems(@Param("orderId") int orderId);

    List<OrderEntity> getOrderList(@Param("offset") int pageNumber, @Param("pageSize") int pageSize);

    UserEntity getUser(@Param("orderId") int orderId);

    void deleteOrder(@Param("id") int id);

    int getOrderListTotalCount();

    List<OrderEntity> getUserOrders(@Param("userId") int id);
}
